home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / dev / debug / apurify_v1_2.lha / test / test.c next >
C/C++ Source or Header  |  1995-09-13  |  635b  |  53 lines

  1. #include <stdio.h>
  2.  
  3. int static_var;
  4.  
  5. static read_shifted(a)
  6.     int *a;
  7.     {
  8.     int i;
  9.     ++(short*)a;
  10.     i=a[0];
  11.     }
  12.  
  13. static read_long(p)
  14.     int *p;
  15.     {
  16.     int z = *p;
  17.     }
  18.  
  19. static free_arg(a)
  20.     int *a;
  21.     {
  22.     free(a);
  23.     }
  24.  
  25. static read_page_zero()
  26.     {
  27.     register long *b;
  28.     b = (long*)4;
  29.     b = (long*)*b;
  30.     }
  31.  
  32. main()
  33.     {
  34.     register int *a,*b;
  35.     int c;
  36.     extern int *malloc();
  37.     AP_Init();
  38.     a=malloc(4),malloc(400),malloc(12000),malloc(40000);
  39.     if(a)
  40.         {
  41.         if(b=malloc(15)) {a[0]=b[-10];c=b[0];free(b);}
  42.         if(a[1]==0) c=32;
  43.         read_long(&c);b=&c;*b=0;
  44.         b = &static_var;
  45.         *b = 15;
  46.         read_shifted(a);
  47.         free_arg(a);
  48.         read_long(a);
  49.         read_page_zero();
  50.         }
  51.     return 0;
  52.     }
  53.